import axios from '@/utils/request'

import config from '@/common/config'

let base=config.getArcBasePath();

/**
 * 问题评论表
 *1    默认只开放普通查询，所有查询，只要上传	 分页参数 {currentPage:当前页码从1开始,pageSize:每页记录数,total:总记录【数如果是0后台会自动计算总记录数非0不会自动计算】}，后台都会自动按分页查询 其它 api用到再打开，没用到的api请注释掉，
 *2 查询、新增、修改的参数格式  params={id:'主键 主键',userid:'评论人',username:'评论人姓名',star:'星级',createDate:'时间',questionId:'问题编号',pcommentId:'上级评论',praiseSum:'点赞数量',isShow:'是否显示0否1是',toUserid:'接收本条评论的用户编号',toUsername:'接收本条评论的用户名称',lvl:'层级0,1,2,3,4',deptid:'部门',context:'评论内容',branchId:'机构编号'}
 **/
 
//普通查询 条件之间and关系  
export const listAqComment = params => { return axios.get(`${base}/mdp/arc/aq/aqComment/list`, { params: params }); };

//模糊查询问题评论表 条件之间or关系  
//export const listAqCommentKey = params => { return axios.get(`${base}/mdp/arc/aq/aqComment/listKey`, { params: params }); };

//删除一条问题评论表 params={id:'主键 主键'}
export const delAqComment = params => { return axios.post(`${base}/mdp/arc/aq/aqComment/del`,params); };

//批量删除问题评论表  params=[{id:'主键 主键'}]
export const batchDelAqComment = params => { return axios.post(`${base}/mdp/arc/aq/aqComment/batchDel`, params); };

//修改一条问题评论表记录
export const editAqComment = params => { return axios.post(`${base}/mdp/arc/aq/aqComment/edit`, params); };

//新增一条问题评论表
export const addAqComment = params => { return axios.post(`${base}/mdp/arc/aq/aqComment/add`, params); };


//打开评论
export const showComment = params => { return axios.post(`${base}/mdp/arc/aq/aqComment/show`, params); };

//关闭评论
export const unShowComment = params => { return axios.post(`${base}/mdp/arc/aq/aqComment/unshow`, params); };


//点赞
export const praiseComment = params => { return axios.post(`${base}/mdp/arc/aq/aqComment/praise`, params); };